package com.uubx.service;

import com.uubx.exception.CustomerException;
import com.uubx.pojo.Insurance;
import com.uubx.vo.InsuranceVo;

import java.util.List;
import java.util.Map;

/**
 * @Author wyy
 * @Date 2020/12/30 19:35
 * @Version 1.0
 */
public interface InsuranceService {

    /**
     * 添加一个保险
     * @param insurance
     */
    public void insertInsurance(Insurance insurance,String desc);

    /**
     * 修改一个保险
     * @param insurance
     */
    public void updateInsurance(Insurance insurance,String desc);

    /**
     * 根据id查询保险
     * @param id
     * @return
     */
    public Insurance findInsuranceById(Long id);

    /**
     *  修改商品的状态  1正常 2下架 3删除    用了逻辑删除,假删除
     * @param insurance
     */
    public void updateInsuranceStatus(Insurance insurance);

    /**
     * 条件查询
     * @return
     */
    public List<Map> findInsuranceWhere(InsuranceVo insuranceVo) throws CustomerException;

    /**
     * 根据商品描述的id 查询数据  与商品修改合并
     * @param id
     * @return
     */
    public String findInsuranceDescById(Long id) throws CustomerException;

}
